package com.newsee.remote.common.enumeration;

/**
 * @author liangzhi.chen
 * @description 组织、idm状态转换枚举
 * @date 2019/7/25 下午 04:54
 **/
public enum  OrgStatusChangeEnum {
    /**
     * idm活动->物资系统在用
     */
    IS_ACTIVE("Active", 1),

    /**
     * idm禁用->物资系统禁用
     */
    IS_DISABLE("Disabled", 0),
    /**
     * idm删除->物资系统禁用
     */
    IS_DELETE("Deleted", 0);

    private String code;

    private Integer desc;

    public static Integer getTextByCode(String code) {
        for (OrgStatusChangeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type.getDesc();
            }
        }
        return null;
    }

    OrgStatusChangeEnum(String code, Integer desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getDesc() {
        return desc;
    }

    public void setDesc(Integer desc) {
        this.desc = desc;
    }
}
